|
rs2324 2.2.0
|
API for configuring and manipulating RS232 4 Click driver. More...
Topics | |
| RS232 4 Device Settings | |
| Settings for registers of RS232 4 Click driver. | |
| RS232 4 MikroBUS Map | |
| MikroBUS pin mapping of RS232 4 Click driver. | |
Functions | |
| void | rs2324_cfg_setup (rs2324_cfg_t *cfg) |
| RS232 4 configuration object setup function. | |
| err_t | rs2324_init (rs2324_t *ctx, rs2324_cfg_t *cfg) |
| RS232 4 initialization function. | |
| err_t | rs2324_generic_write (rs2324_t *ctx, uint8_t *data_in, uint16_t len) |
| RS232 4 data writing function. | |
| err_t | rs2324_generic_read (rs2324_t *ctx, uint8_t *data_out, uint16_t len) |
| RS232 4 data reading function. | |
| void | rs2324_set_cts_pin (rs2324_t *ctx, uint8_t state) |
| RS232 4 set CTS pin function. | |
| uint8_t | rs2324_get_rts_pin (rs2324_t *ctx) |
| RS232 4 get RTS pin function. | |
API for configuring and manipulating RS232 4 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
| void rs2324_cfg_setup | ( | rs2324_cfg_t * | cfg | ) |
RS232 4 configuration object setup function.
This function initializes Click configuration structure to initial values.
| [out] | cfg | : Click configuration structure. See rs2324_cfg_t object definition for detailed explanation. |
| err_t rs2324_generic_read | ( | rs2324_t * | ctx, |
| uint8_t * | data_out, | ||
| uint16_t | len ) |
RS232 4 data reading function.
This function reads a desired number of data bytes by using UART serial interface.
| [in] | ctx | : Click context object. See rs2324_t object definition for detailed explanation. |
| [out] | data_out | : Output read data. |
| [in] | len | : Number of bytes to be read. |
>0 - Number of data bytes read, <=0 - Error/Empty Ring buffer. See #err_t definition for detailed explanation. | err_t rs2324_generic_write | ( | rs2324_t * | ctx, |
| uint8_t * | data_in, | ||
| uint16_t | len ) |
RS232 4 data writing function.
This function writes a desired number of data bytes by using UART serial interface.
| [in] | ctx | : Click context object. See rs2324_t object definition for detailed explanation. |
| [in] | data_in | : Data buffer for sending. |
| [in] | len | : Number of bytes for sending. |
>=0 - Success, <0 - Error. See #err_t definition for detailed explanation. | uint8_t rs2324_get_rts_pin | ( | rs2324_t * | ctx | ) |
RS232 4 get RTS pin function.
This function returns the RTS pin logic state.
| [in] | ctx | : Click context object. See rs2324_t object definition for detailed explanation. |
| err_t rs2324_init | ( | rs2324_t * | ctx, |
| rs2324_cfg_t * | cfg ) |
RS232 4 initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
| [out] | ctx | : Click context object. See rs2324_t object definition for detailed explanation. |
| [in] | cfg | : Click configuration structure. See rs2324_cfg_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation.